home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / cbibcode.arc / GMTIME.C < prev    next >
Encoding:
C/C++ Source or Header  |  1991-08-05  |  344 b   |  12 lines

  1. /* gmtime.c        Turbo C Bible functions, p. 334     */
  2. #include <stdio.h>
  3. #include <time.h>
  4. main()
  5. {
  6.     time_t tnow;
  7.     struct tm *tmnow;
  8.     time(&tnow);/* Get the time in seconds since 0 hrs GMT, 1/1/70    */
  9.     tmnow = gmtime(&tnow);
  10.         /* Convert it to string showing Greenwich Mean Time */
  11.     printf("Greenwich Mean Time = %s\n", asctime(tmnow));
  12. }